<!DOCTYPE html>
<html>
	<head>
		<title>个人信息</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/weui.min.css">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/jquery-weui.css">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/base.css?123456">
		<link rel="stylesheet" type="text/css" href="${s.base}/mobile/css/city.css"/>
	</head>


	<style type="text/css">
		html,body{background:#f5f5f5;}
		.xyg-comp-list-select{width:96%; margin: 0.2rem 2%; border-radius: 0.5rem; height:auto;}
		.xyg-comp-list-select-desc{width:100%;text-align:center;line-height:2.2rem; height:2.2rem;font-size: 0.8rem; color:#ffffff; letter-spacing: 0.01rem; border-radius: 0.2rem 0.2rem 0px 0px; background: #069AFE;border-right: 0.001rem solid #f5f5f5;border-left: 0.001rem solid #f5f5f5;}
		.xyg-comp-list-select-item{width:90%; padding:0px 5%; line-height:2rem; height:2rem;font-size: 0.8rem; color:#333333; letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
		.xyg-comp-list-select-item input::-webkit-input-placeholder {color: #999999;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-title{width:30%; font-size: 14px; color:#333333; height:1.8rem; text-align:left; float:left;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-content{width:70%; height:1.8rem; text-align:right; float:left;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-content input[type='text']{width:100%; font-size: 14px; height:1.8rem; line-height:1.8rem;background-color:transparent;border:0; text-align:right;}

		.xyg-comp-list-select-textarea{width:90%;  color:#333333;padding:0px 5%;height:13.2rem;font-size: 0.8rem;  letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-title{width:100%; line-height: 2rem; height:2rem; text-align:left;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content{width:100%; height:4rem; text-align:left; float:left;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content textarea{width:92%; padding: 0.2rem 4%; height:9.6rem; margin-bottom: 1rem; line-height:1rem;background-color:#E5E5E5;;border:0; text-align:left;}

		.xyg-comp-xy{height:2rem; line-height:2rem;width:93%; margin:0px 2% 0px 5%;}
		.xyg-bottom{width:50%; height:auto;  margin:1.5rem 25%;}
		.xyg-bottom  .xyg-btn{
			position: relative;
			background: #64B6DF;
			display: block;
			margin-left: auto;
			margin-right: auto;
			padding-left: 14px;
			padding-right: 14px;
			box-sizing: border-box;
			font-size: 20px;
			text-align: center;
			text-decoration: none;
			color: #fff;
			line-height: 2.6rem;
			border-radius: 1.3rem;
			-webkit-tap-highlight-color: rgba(0,0,0,0);
			overflow: hidden;
		}
	</style>
	<body>
	<div id="showContent">
		<div class="xyg-comp-list-select">
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>渠道类型
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="selectType" readonly value="<#if member.type=='1'>个人</#if><#if member.type=='2'>公司</#if>" placeholder="请选择渠道类型" />
					<input type="hidden" id="type" value="${member.type}"/>
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>公司名
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="companyName" value="${member.companyName}" placeholder="请输入公司名" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>中文名
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="name" value="${member.name}" placeholder="请输入中文名" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>英文名
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="englishName" value="${member.englishName}" placeholder="请输入英文名" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>性别
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="selectSex" value="<#if member.sex=='1'>男</#if><#if member.sex=='2'>女</#if>" placeholder="请选择性别" />
					<input type="hidden" id="sex" value="${member.sex}"/>
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>手机
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="phone" value="${member.phone}" placeholder="请输入手机" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>微信号
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="wechat" value="${member.wechat}" placeholder="请输入微信号" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>开户行
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="bank" value="${member.bank}" placeholder="请输入开户行" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>账户名
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="accountName" value="${member.accountName}" placeholder="请输入账户名" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-title">
					<span style="color:#ff3b30;"></span>帐号
				</div>
				<div class="xyg-comp-list-select-item-content">
					<input type="text" id="accountNum" value="${member.accountNum}" placeholder="请选输入帐号" />
				</div>
			</div>
		</div>
		<div class="xyg-bottom">
			<a href="javascript:;" class="xyg-btn" id="showTooltips" >提&nbsp;&nbsp;交</a>
		</div>
	</div>
	</body>
	<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
	<script src="${s.base}/mobile/newjs/jquery-2.1.4.js?12132"></script>
	<script src="${s.base}/mobile/newjs/jquery-weui.js?12132"></script>
	<script src="${s.base}/mobile/fonts/iconfont.js?121322323"></script>
	<script src="${s.base}/mobile/js/base.js?12345454547777"></script>
	<!--js分享代码开始-->

	<input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
	<input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
	<input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
	<input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
	<input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
	<input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
	<input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
	<input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
	<script src="${s.base}/mobile/js/share.js"></script>

	<script type="text/javascript">
		var id = '${memberId}';
        // 渠道类型
        $("#selectType").select({
            title: "请选择渠道类型",
            items: [{title:'个人',value:'1'}, {title:'公司',value:'2'}],
            onClose: function(d) {
                $("#type").val(d.data.values);
            },
            onOpen: function() {
            },
        });
        // 性别
        $("#selectSex").select({
            title: "请选择性别",
            items: [{title:'男',value:'1'}, {title:'女',value:'2'}],
            onClose: function(d) {
                $("#sex").val(d.data.values);
            },
            onOpen: function() {
            },
        });


        $("#showTooltips").on("click", function () {
            var type = $("#type").val();
            if (type == null || type == "") {
                $.toast("请选择渠道类型", "text");
                return false;
            }
            var companyName = $("#companyName").val();
            if (companyName == null || companyName == "") {
                $.toast("请输入公司名称", "text");
                return false;
            }
            var name = $("#name").val();
            if (name == null || name == "") {
                $.toast("请输入中文名", "text");
                return false;
            }
            var englishName = $("#englishName").val();

            var sex = $("#sex").val();
            if (sex == null || sex == "") {
                $.toast("请选择性别", "text");
                return false;
            }
            var phone = $("#phone").val();
            if (phone == null || phone == "") {
                $.toast("请输入手机号", "text");
                return false;
            }
            if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))) {
                $.toast("手机号码有误，请重填", "text");
                return false;
            }
            var wechat = $("#wechat").val();
            var bank = $("#bank").val();
            if (bank == null || bank == "") {
                $.toast("请输入开户行", "text");
                return false;
            }
            var accountNum = $("#accountNum").val();
            if (accountNum == null || accountNum == "") {
                $.toast("请输入账号", "text");
                return false;
            }

            var param = {
                id: id,
                type: type,
                companyName: companyName,
                name: name,
                englishName: englishName,
                sex:sex,
                phone: phone,
                wechat: wechat,
                bank: bank,
                accountNum: accountNum
            };
            $.showLoading("正在提交中");
            $.post("/phone/bindUserSave", param, function (result) {
                if(1==result.returnInfo.state){
                    $.hideLoading();
                    $.alert("绑定成功", function() {
                        //点击确认后的回调函数
                        myHome(id);
                    });

                }else{
                    $.hideLoading();
                    $.toast("绑定失败", "text");
                }

            }, "json");


        });
	</script>
</html>
